﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication5
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TextBox1.Text = string.Format(Request.QueryString["username"]);
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (TextBox2.Text == string.Format(Request.QueryString["password"]))
            {
                Literal1.Text = "登入成功！<a href=\"WebForm3.aspx\">跳转到登入成功界面！</a>";
                Response.Redirect(string.Format("WebForm3.aspx?username={0}",TextBox1.Text));
            }
            else
            {
                Response.Write("密码输入错误！");
            }
        }
    }
}